<%@ page import="model.Student" %><%--
  Author: LZN
  Date: 2023/3/12 0012 20:42
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:forEach var="item1" items="${studentList}"></c:forEach>

<html>
<head>
    <title>主页面</title>
    <link rel="stylesheet" type="text/css" href="bootstrap-3.3.7-dist/css/bootstrap.css">
    <script type="text/javascript" src="jquery-3.2.1/jquery-3.2.1.js"></script>
    <script type="text/javascript" src="bootstrap-3.3.7-dist/js/bootstrap.js"></script>
</head>
<body background="img/3.jpg">
<h2><p align="center"><a href="add.jsp">添加学生信息</a></p></h2>
<center>
    <form action="SelectByStudentNoServlet" method="get">
        <th>学号:<input type="text" placeholder="请输入学号" name="studentNo"></th>
        <input type="submit" value="查询" class="btn btn-primary"><br><br>
    </form>
</center>
<table align="center" width="50%" border="1">
    <form action="SearchServlet" method="get">
        <th style="color: blue">
            请选择查询条件(模糊)：
            <select id="condition" style="width:100px">
                <option value="学号" id="1" name="studentNo">学号</option>
                <option value="姓名" id="2" name="name">姓名</option>
            </select>
        </th>
        <th>
            请输入查询内容:
            <input type="text">
            <input type="submit" value="查询" style="color: blueviolet">
        </th>
    </form>
</table>
<br>
<table border="1" class="table table-bordered table table-hover table table-condensed text-center">
    <tr align="center" style="color: #c9302c">
        <td class="table-primary">学生学号</td>
        <td>学生姓名</td>
        <td>性别</td>
        <td>年龄</td>
        <td>班级</td>
        <td>出生日期</td>
        <td>电话</td>
        <td>学院</td>
        <td>专业</td>
        <td>地址</td>
        <td>更新操作</td>
        <td>删除操作</td>
    </tr>
    <c:forEach var="item" items="${studentList}">
        <tr align="center">
            <td>${item.studentNo}</td>
            <td>${item.name}</td>
            <td>${item.sex}</td>
            <td>${item.age}</td>
            <td>${item.banji}</td>
            <td>${item.bornDate}</td>
            <td>${item.phone}</td>
            <td>${item.faculty}</td>
            <td>${item.major}</td>
            <td>${item.address}</td>
            <td><a href="ToUpdateStudentServlet?studentNo=${item.studentNo}" class="btn btn-primary">更新</a></td>
            <td><a href="DeleteStudentServlet?studentNo=${item.studentNo}" class="btn btn-primary"
                   onclick="return confirm('确定要删除么？');">删除</a></td>
        </tr>
        </tr>
    </c:forEach>
</table>
</body>
</html>
